<?php

require_once('inc.config.php');

$useTemplate   = 'agent_detail.html';

$condition = array(
	"aid" => $_GET["aid"],
	"price" => $_GET["price"],
	"floor" => $_GET["floor"],
	"square"  => $_GET["square"],
	"isfull" => $_GET["isfull"]
);


$section = $_GET["section"];

$page = new QuickSkin ($useTemplate );

template_ini($page);

$agentinfo = $myAgent->getAgentDetail($condition["aid"]);


if($section=="rent"){
	$houselist = $myHouse->getSearchRentList($condition ,1 , -1);
	$page->assign("rentcls" , "selected");
}else{
	$houselist = $myHouse->getSearchSellList($condition , 1 , -1);
	$page->assign("sellcls" , "selected");
}

$page->assign($agentinfo);
$page->assign("houselist" , $houselist);

$page->assign("indexcls" , "bfont");
$page->output();


ob_end_flush();

?>
